package com.dhcc.utils;

import java.io.PrintWriter;
import java.io.StringWriter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.sun.tools.internal.ws.wsdl.document.jaxws.Exception;

/**
 * 
 * 将日志信息变成字符串
 * @author zhangkairong 
 * @version 2017-3-21 下午7:45:21
 * 
 */
public class LogUtil {
	public static String getTrace(Throwable t) {   
		StringWriter stringWriter= new StringWriter();   
		PrintWriter writer= new PrintWriter(stringWriter);   
		t.printStackTrace(writer);   
		StringBuffer buffer= stringWriter.getBuffer();   
		return buffer.toString();   
	}   
	
	
}
